<template>
  <van-swipe :autoplay="3000">
    <van-swipe-item v-for="(item, index) in banners" :key="index">
      <a :href="item.link">
        <img :src="item.image" />
      </a>
    </van-swipe-item>
  </van-swipe>
</template>

<script>
import Vue from "vue";
import { Swipe, SwipeItem } from "vant";

Vue.use(Swipe).use(SwipeItem);
export default {
  props: {
    banners: {
      type: Array,
      default() {
        return [];
      }
    }
  }
};
</script>

<style lang="less" scoped>
.van-swipe-item {
  img {
    width: 100%;
  }
}
.van-swipe {
  .van-swipe__indicators {
  }
  /deep/.van-swipe__indicator--active {
    background-color: deeppink;
  }
}
</style>

